
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module about</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>about</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/media/sf_svns/occams/trunk/knife/about.py">/media/sf_svns/occams/trunk/knife/about.py</a></font></td></tr></table>
    <p><tt>A&nbsp;class&nbsp;to&nbsp;store&nbsp;information&nbsp;'<a href="#About">About</a>'&nbsp;a&nbsp;column&nbsp;of&nbsp;data.&nbsp;<br>
&nbsp;<br>
The&nbsp;key&nbsp;method&nbsp;is&nbsp;'keep'&nbsp;which&nbsp;stores&nbsp;information&nbsp;about&nbsp;a&nbsp;new&nbsp;datum&nbsp;in<br>
a&nbsp;set&nbsp;of&nbsp;contexts.&nbsp;For&nbsp;example,&nbsp;if&nbsp;a&nbsp;row&nbsp;has&nbsp;a&nbsp;class&nbsp;'car'&nbsp;then<br>
details&nbsp;about&nbsp;the&nbsp;cells&nbsp;in&nbsp;that&nbsp;car&nbsp;will&nbsp;be&nbsp;stored&nbsp;in&nbsp;in&nbsp;'car'&nbsp;as&nbsp;well<br>
as&nbsp;in&nbsp;a&nbsp;special&nbsp;'allover'&nbsp;context&nbsp;that&nbsp;accummulates&nbsp;details&nbsp;over&nbsp;all<br>
contexts.<br>
&nbsp;<br>
The&nbsp;real&nbsp;work&nbsp;of&nbsp;this&nbsp;code&nbsp;is&nbsp;done&nbsp;by&nbsp;Num&nbsp;or&nbsp;Sym&nbsp;objects.&nbsp;&nbsp;In&nbsp;fact,<br>
most&nbsp;of&nbsp;'<a href="#About">About</a>'&nbsp;is&nbsp;a&nbsp;traffic&nbsp;code&nbsp;that&nbsp;keeps&nbsp;details&nbsp;on&nbsp;Nums&nbsp;or&nbsp;Syms<br>
stored&nbsp;in&nbsp;different&nbsp;contexts.<br>
&nbsp;<br>
This&nbsp;code&nbsp;is&nbsp;part&nbsp;of&nbsp;KNIFE:&nbsp;cropping&nbsp;complexity,&nbsp;culling&nbsp;confusion,&nbsp;<br>
and&nbsp;cutting&nbsp;the&nbsp;crap&nbsp;since&nbsp;2012<br>
&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.----------------._________________<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|=()=========---&nbsp;&nbsp;\-----------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`\&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jgs&nbsp;&nbsp;\_________________/^^^^^^^^^^^^^^^^^^<br>
&nbsp;<br>
(c)&nbsp;2012,&nbsp;Tim&nbsp;Menzies,&nbsp;tim@menzies.us,&nbsp;LGPL&nbsp;v3.0<br>
&nbsp;<br>
Todo<br>
----<br>
for&nbsp;numberic&nbsp;classes,&nbsp;this&nbsp;class&nbsp;divides&nbsp;the&nbsp;data&nbsp;far&nbsp;too&nbsp;much.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="math.html">math</a><br>
</td><td width="25%" valign=top><a href="re.html">re</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="about.html#About">About</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="About">class <strong>About</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="About-__init__"><strong>__init__</strong></a>(self, n, name, weight, details<font color="#909090">=&lt;class 'thing.Sym'&gt;</font>, klassp<font color="#909090">=False</font>)</dt><dd><tt>'contexts'&nbsp;is&nbsp;a&nbsp;place&nbsp;to&nbsp;store&nbsp;all&nbsp;contexts.<br>
'cllover'&nbsp;is&nbsp;some&nbsp;place&nbsp;to&nbsp;store&nbsp;summaries&nbsp;from&nbsp;all&nbsp;contexts.<br>
'aetails'&nbsp;is&nbsp;class&nbsp;from&nbsp;which&nbsp;we&nbsp;generate&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;to&nbsp;store&nbsp;data.<br>
'index'&nbsp;is&nbsp;a&nbsp;back&nbsp;index&nbsp;remembering&nbsp;what&nbsp;rows&nbsp;have&nbsp;some&nbsp;data&nbsp;<br>
(this&nbsp;index&nbsp;will&nbsp;be&nbsp;used&nbsp;to&nbsp;optimize&nbsp;rule-based&nbsp;programming,&nbsp;one&nbsp;day).</tt></dd></dl>

<dl><dt><a name="About-all"><strong>all</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;data&nbsp;held&nbsp;in&nbsp;the&nbsp;'allover'&nbsp;context.</tt></dd></dl>

<dl><dt><a name="About-clone"><strong>clone</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;same&nbsp;kind&nbsp;on&nbsp;'<a href="#About">About</a>'&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;counts&nbsp;zero-ed&nbsp;out.</tt></dd></dl>

<dl><dt><a name="About-isNumeric"><strong>isNumeric</strong></a>(self)</dt><dd><tt>Returns&nbsp;true&nbsp;if&nbsp;this&nbsp;column&nbsp;is&nbsp;about&nbsp;numerics.</tt></dd></dl>

<dl><dt><a name="About-keep"><strong>keep</strong></a>(self, at, x, row)</dt><dd><tt>Ignore&nbsp;unknown&nbsp;values,&nbsp;remember&nbsp;what&nbsp;row&nbsp;had&nbsp;this&nbsp;datum,<br>
then&nbsp;store&nbsp;information&nbsp;about&nbsp;'x'&nbsp;in&nbsp;the&nbsp;'allover'&nbsp;context<br>
as&nbsp;well&nbsp;at&nbsp;the&nbsp;context&nbsp;named&nbsp;'at'.</tt></dd></dl>

<dl><dt><a name="About-store"><strong>store</strong></a>(self, at, x, row)</dt><dd><tt>Keep&nbsp;something&nbsp;in&nbsp;a&nbsp;context.&nbsp;If&nbsp;we&nbsp;have&nbsp;no&nbsp;keeper&nbsp;yet,<br>
then&nbsp;create&nbsp;one&nbsp;from&nbsp;'details'.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table>
</body></html>